﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="PaperList.aspx.cs" Inherits="E.Web.Teacher.internals.exam.PaperList" %>
<%@ Import Namespace="E.Model" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
  <title>学员列表</title>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />  
  <link rel="stylesheet" href="/css/main.css" type="text/css" media="all" />
  <link rel="stylesheet" href="/css/t_main.css" type="text/css" media="all" />
  <link rel="stylesheet" href="/css/student.css" type="text/css" media="all" />
  <link rel="stylesheet" href="/css/flora.datepick.css" type="text/css" media="all" />
  <script type="text/javascript" src="/js/jquery-1.4.2.min.js"></script>
  <script type="text/javascript" src="/js/jquery.datepick.min.js"></script>
  <script type="text/javascript" src="/js/jquery.datepick-zh-CN.js"></script>
  <script type="text/javascript" src="/js/ajax.js"></script>
  <script type="text/javascript" src="/js/exam.js"></script>
  <script type="text/javascript" src="/js/CheckBox.js"></script>
  <script type="text/javascript">
//      $(document).ready(
//      function () {
//          $("#FromDateTxt").datepick({ dateFormat: 'yy-mm-dd', showOn: 'button', buttonImage: '/images/icon/calendar-green.gif', buttonImageOnly: true });
//          $("#ToDateTxt").datepick({ dateFormat: 'yy-mm-dd', showOn: 'button', buttonImage: '/images/icon/calendar-green.gif', buttonImageOnly: true });
//      }
//    );
  </script>
</head>
<body>
  <form id="form1" method="post" action="?act=s">
    <div class="m_top"></div>
    <div class="block_2">
      <div style="width:650px; height:22px;">
        <div class="title">&nbsp;考试列表</div>
      </div>
      <div class="spe_line_2"></div>
      <div style="width:650px; height:23px; margin-top:6px;">
        <div class="fl" style="line-height:23px;">姓名：</div>
        <div class="fl"><input type="text" id="UserNameTxt" name="UserNameTxt" value="<%=username %>" /></div>
        <div class="fl" style="line-height:23px;">&nbsp;Email：</div>
        <div class="fl"><input type="text" id="EmailTxt" name="EmailTxt" value="<%=email %>" /></div>
        <div class="fl" style="line-height:23px;">&nbsp;登录名：</div>
        <div class="fl"><input type="text" id="LoginIDTxt" name="LoginIDTxt" value="<%=loginid %>" /></div>
      </div>
      <div style="width:650px; height:23px; margin-top:6px;">
        <div class="fl" style="line-height:23px;">报名机构：</div>
        <div class="fl">
          <% if (areaList != null && areaList.Count > 0) { %>
          <select id="AreaSlt" name="AreaSlt">
            <option value="-1">请选择</option>
            <% foreach (DictAreaModel areaModel in areaList) { %>
              <option value="<%=areaModel.ID %>"><%=areaModel.Name%></option>
            <% } %>
          </select>
          <% } %>
        </div>
        <div class="fl" style="line-height:23px;">&nbsp;项目及课程：</div>
        <div class="fl">          
          <% if (certificateList != null && certificateList.Count > 0) { %>
          <select id="CertificateSlt" name="CertificateSlt" onchange="GetEmptySettingTemplate2(1);">
            <% if (authority != E.Enum.EnumTeacherAuthority.Internals) { %>
            <option value="-1">请选择</option>
            <% } %>
            <% foreach (System.Collections.Generic.KeyValuePair<int, string> kvp in certificateList) { %>
            <option value="<%=kvp.Key %>"><%=kvp.Value%></option>
            <% } %>
          </select>
          <select id="CourseSlt" name="CourseSlt">
            <option value="-1">请选择课程</option>
          </select>
          <% } %>
          
        </div>
      </div>
      <div style="width:650px; height:23px; margin-top:6px;">
        <div class="fl" style="line-height:23px;">试卷名称：</div>
        <div class="fl"><input type="text" id="Text1" name="ExamTitle" value="<%=examtitle %>" /></div>
        <div class="fl">&nbsp;<input type="image" style="width:54px; height:23px;" src="/images/btn/search.gif" /></div>
      </div>
    </div>
    
    <div class="block_2">
      <div style="width:650px; height:22px;">
        <div class="title">&nbsp;搜索结果</div>
      </div>
      <div class="spe_line_2"></div>
      
    <% if (paperList != null && paperList.Count > 0) { %>
      <table id="datatable">
        <tr>
            <td class="HeadCell">试卷名称</td>
            <td class="HeadCell">学员姓名</td>
            <td class="HeadCell">项目</td>
            <td class="HeadCell">课程名称</td>
            <td class="HeadCell">操作</td>
        </tr>
        <% foreach (PaperInspectModel model in paperList) { %>
        <tr>
            <td class="ContentCell"><%=model.ExamTitle %></td>
            <td class="ContentCell"><%=model.UserName.Equals("") ? "&nbsp;" : model.UserName %></td>
            <td class="ContentCell"><%=model.ProjectName.Equals("") ? "&nbsp;" : model.ProjectName%></td>
            <td class="ContentCell"><%=model.CourseName.Equals("")?"&nbsp;":model.CourseName %></td>
            <td class="ContentCell"><a href="/internals/exam/PaperInspect.aspx?id=<%=model.TestId %>;<%=model.UserID %>">查看</a></td>
        </tr>
        <% } %>
      </table>
      
      <div class="fr" style="margin:8px 0 0 0;"><%=mypager%></div>
      
    <% } else { %>
    <% } %>
    
    </div>
     <% if (act == "s") { %>
    <script type="text/javascript">
      var page_categoryid = 1;
      var page_certificateid = <%=currentCertificateID %>;
      var page_courseid = <%=courseid %>;
      GetEmptySettingTemplateBase(1,page_certificateid,page_courseid);
      setTimeout(function(){ $("#CertificateSlt").val(page_certificateid); $("#CourseSlt").val(page_courseid); },100);
    </script>
      <% } else { %>
    <script type="text/javascript">
        GetEmptySettingTemplate2(1);
    </script>
      <% } %>
  </form>
  <script type="text/javascript">
  <% if (areaid != -1)
     { %>
     document.getElementById("AreaSlt").value = <%=areaid %>;     
  <% } %>
  <% if (currentCertificateID != -1)
     { %>
     document.getElementById("CertificateSlt").value = <%=currentCertificateID %>;
  <% } %>
  </script>
</body>
</html>
